Skip to content

GH-48055: [C++][FlightRPC] Allow spaces while parsing Table Type in ODBC#48056

Merged
lidavidm merged 3 commits into
apache:mainfrom
Bit-Quill:gh-48055-allow-space
Nov 9, 2025
Merged

GH-48055: [C++][FlightRPC] Allow spaces while parsing Table Type in ODBC#48056
lidavidm merged 3 commits into
apache:mainfrom
Bit-Quill:gh-48055-allow-space

Conversation

@alinaliBQ

@alinaliBQ alinaliBQ commented Nov 4, 2025

Copy link
Copy Markdown
Collaborator

Rationale for this change

Allow spaces while parsing Table Type in ODBC. For example, driver should be able to interpret " TABLE , VIEW " as "TABLE" and "VIEW".

What changes are included in this PR?

  • Allow spaces while parsing Table Type in ODBC & Add 3 tests

Are these changes tested?

Tested locally on Windows MSVC.

Are there any user-facing changes?

N/A

@alinaliBQ alinaliBQ changed the title GH-47787: [C++][FlightRPC] Allow spaces while parsing Table Type in ODBC GH-48055: [C++][FlightRPC] Allow spaces while parsing Table Type in ODBC Nov 4, 2025
@github-actions github-actions Bot added the awaiting review Awaiting review label Nov 4, 2025
@github-actions

github-actions Bot commented Nov 4, 2025

Copy link
Copy Markdown

⚠️ GitHub issue #48055 has been automatically assigned in GitHub to PR creator.

@alinaliBQ alinaliBQ marked this pull request as ready for review November 5, 2025 18:12
@alinaliBQ alinaliBQ requested a review from lidavidm as a code owner November 5, 2025 18:12
Comment thread cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_statement_get_tables.cc Outdated
@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Nov 5, 2025
alinaliBQ and others added 2 commits November 5, 2025 14:09
Co-authored-by: justing-bq <justin.gossett@improving.com>

// Only put the string if the trimmed result is non-empty
if (!trimmed_type.empty()) {
table_types.emplace_back(trimmed_type);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move added here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable but is there maybe a way to do this with string_view instead of copying the string?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it's not likely to matter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A string copy is still necessary for the sake of trimming the string.

@github-actions github-actions Bot added awaiting merge Awaiting merge awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review awaiting merge Awaiting merge labels Nov 6, 2025
@github-actions github-actions Bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Nov 7, 2025
@justing-bq

Copy link
Copy Markdown
Contributor

@lidavidm Please take another look.

@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Nov 9, 2025
@lidavidm lidavidm merged commit 4576192 into apache:main Nov 9, 2025
44 of 47 checks passed
@lidavidm lidavidm removed the awaiting merge Awaiting merge label Nov 9, 2025
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 0 benchmarking runs that have been run so far on merge-commit 4576192.

None of the specified runs were found on the Conbench server.

The full Conbench report has more details.

@justing-bq justing-bq deleted the gh-48055-allow-space branch January 27, 2026 21:21
Mottl pushed a commit to Mottl/arrow that referenced this pull request May 26, 2026
…e in ODBC (apache#48056)

### Rationale for this change
Allow spaces while parsing Table Type in ODBC. For example, driver should be able to interpret `"      TABLE , VIEW      "` as "TABLE" and "VIEW".
### What changes are included in this PR?
-  Allow spaces while parsing Table Type in ODBC & Add 3 tests
### Are these changes tested?
Tested locally on Windows MSVC.
### Are there any user-facing changes?
N/A

* GitHub Issue: apache#48055

Lead-authored-by: Alina (Xi) Li <alina.li@improving.com>
Co-authored-by: justing-bq <62349012+justing-bq@users.noreply.github.com>
Co-authored-by: justing-bq <justin.gossett@improving.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants